<template>
	<view class="list-loading">
		<view class="fboxRow Ycenter Xcenter font24" :class="classname ? classname : 'color-9899A1'">
			<!-- <van-loading v-if="loading == 'loading'" size="20px">加载中</van-loading> -->
			<u-loadmore status="loading" v-if="loading == 'loading'" />
			<view class="color-9899A1" v-if="loading == 'not'">已经到底了</view>
			<view v-if="loading == 'more'" @click="moreClick">{{ title }}</view>
			<view class="color-9899A1" style="padding-top: 100rpx" v-if="loading == 'noDdata'">
				暂无内容
			</view>
			<view class="color-9899A1" style="padding-top: 100rpx" v-if="loading == 'noErr'">
				加载出错了~
			</view>
		</view>
	</view>
</template>

<script>
export default {
	props: {
		// 返回
		loading: {
			type: String,
			default: 'none' // loading 加载中 | not 已经到底了 | none 隐藏 | more 点击加载更多 | noDdata 暂无数据
		},
		title: {
			type: String,
			default: '点击加载更多'
		},
		classname: {
			type: String,
			default: 'color-9899A1'
		}
	},
	data() {
		return {};
	},
	methods:{
		moreClick(){
			this.$emit('more')
		}
	}
};
</script>

<style scoped>
.list-loading {
	padding: 30rpx 0;
}
</style>
